﻿@model Unijovem.UI.Models.LeituraBiblicaModel
@{
    ViewBag.Title = "Diaria";
}
<script type="text/javascript">
 $(document).ready(function () {
        $("#@string.Concat("verTodasPessoas", Model.Id)").click(function(evt){
            $("#@string.Concat("dialog-modal", Model.Id)").show();

            $("#@string.Concat("dialog-modal", Model.Id)").dialog({
                modal: true,
                resizable: false,
                width: 500,
                height: 530
            });

            evt.preventDefault();
        });

        $("#@string.Concat("EuLi", Model.Id)").click(function (evt) {

            $.ajax({ type: "POST",
                url: "/LeituraBiblica/MarcarLeitura",
                data: "idLeitura=" + $("#@string.Concat("Id", Model.Id)").val(),
                success: function (result) {
                    if (result.success){
                        $("#@string.Concat("TextoLeitura", Model.Id)").text(result.textoLeitura);
                        $("#@string.Concat("EuLi", Model.Id)").hide();
                        }
                },
                error: function (req, status, error) {
                    alert("Sorry! We could not receive your feedback at this time.");
                }
            });
            
            evt.preventDefault();
        });

        $("#@string.Concat("TextoLeitura", Model.Id)").mouseover(function () {
            $("#@string.Concat("DivUsuarios", Model.Id)").show();
        });
     
        $("#@string.Concat("DivUsuarios", Model.Id)").mouseover(function() {
            $("#@string.Concat("DivUsuarios", Model.Id)").show();
        });
     
        $("#@string.Concat("TextoLeitura", Model.Id)").mouseout(function () {
            $("#@string.Concat("DivUsuarios", Model.Id)").hide();
        });
     
        $("#@string.Concat("DivUsuarios", Model.Id)").mouseout(function () {
            $("#@string.Concat("DivUsuarios", Model.Id)").hide();
        });

        
    });
</script>
<div class="borderVermelha forumDetalhesOver" style="margin-bottom: 10px; padding: 7px;">
    <div class="fonteDestaque" style="padding: 5px">
        Leitura Diária - @Html.DisplayFor(model => model.Dia)º dia</div>
    <div style="padding: 10px; color: #696969; cursor: default;" class="divTexto">
        <fieldset>
            <legend>LeituraBiblicaModel</legend>
            <div id="menu" style="float: right; padding-right: 70px;">
                <ul class="menu">
                    <li><a href="#" class="parent" style="color: White">&nbsp;&nbsp;&nbsp;&nbsp;Trocar tradução
                        e versão&nbsp;&nbsp;</a>
                        <div>
                            <ul>
                                <li>@Html.ActionLink("Português", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 34 }, null)</li>
                                <li>@Html.ActionLink("Aramaico", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 0 }, null)</li>
                                <li>@Html.ActionLink("Alemão", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 11 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("Elberfelder 1871", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 11 }, null)</li>
                                            <li>@Html.ActionLink("Elberfelder 1905", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 12 }, null)</li>
                                            <li>@Html.ActionLink("Luther 1545", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 13 }, null)</li>
                                            <li>@Html.ActionLink("Luther 1912", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 14 }, null)</li>
                                            <li>@Html.ActionLink("Schlachter", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 15 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Espanhol", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 35 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("Reina Valera", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 35 }, null)</li>
                                            <li>@Html.ActionLink("NT - Reina Valera", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 36 }, null)</li>
                                            <li>@Html.ActionLink("Sagradas Escrituras 1569", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 37 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Francês", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 7 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("Darby", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 7 }, null)</li>
                                            <li>@Html.ActionLink("Louis Segond", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 8 }, null)</li>
                                            <li>@Html.ActionLink("Martin", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 9 }, null)</li>
                                            <li>@Html.ActionLink("Ostervald", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 10 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Grego", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 16 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("NT - Byzantine Majority Text", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 16 }, null)</li>
                                            <li>@Html.ActionLink("NT - Textus Receptus", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 17 }, null)</li>
                                            <li>@Html.ActionLink("NT - Tischendor", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 18 }, null)</li>
                                            <li>@Html.ActionLink("NT - Westcott Hort", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 19 }, null)</li>
                                            <li>@Html.ActionLink("AT - LXXA Com acentuação", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 20 }, null)</li>
                                            <li>@Html.ActionLink("AT - LXXA Sem acentuação", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 21 }, null)</li>
                                            <li>@Html.ActionLink("Grego Moderno", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 22 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Hebraico", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 23 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("AT - Aleppo Codex", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 23 }, null)</li>
                                            <li>@Html.ActionLink("AT - BHS Consoantes e Vogais", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 24 }, null)</li>
                                            <li>@Html.ActionLink("AT - BHS somente consoantes", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 25 }, null)</li>
                                            <li>@Html.ActionLink("AT - Westminster LeningradCodex", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 26 }, null)</li>
                                            <li>@Html.ActionLink("AT - WLC Consoantes e Vogais", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 27 }, null)</li>
                                            <li>@Html.ActionLink("AT - WLC somente consoantes", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 28 }, null)</li>
                                            <li>@Html.ActionLink("Hebraico Moderno", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 29 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Inglês", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 6 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("American King James Version", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 1 }, null)</li>
                                            <li>@Html.ActionLink("American Standard Version", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 2 }, null)</li>
                                            <li>@Html.ActionLink("Douay Rheims", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 3 }, null)</li>
                                            <li>@Html.ActionLink("King James Version", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 4 }, null)</li>
                                            <li>@Html.ActionLink("World English Bible", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 5 }, null)</li>
                                            <li>@Html.ActionLink("Youngs Literal Translation", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 6 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Italiano", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 30 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("Bíblia Giovanni Diodati", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 30 }, null)</li>
                                            <li>@Html.ActionLink("Bíblia Riveduta", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 31 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                                <li>@Html.ActionLink("Latim", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 32 }, new { @class = "parent" })
                                    <div>
                                        <ul>
                                            <li>@Html.ActionLink("Nova Vulgata", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 32 }, null)</li>
                                            <li>@Html.ActionLink("Vulgata Clementina", "Diaria", "LeituraBiblica", new { dia = Model.Dia, versao = 33 }, null)</li>
                                        </ul>
                                    </div>
                                </li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </div>
            @Html.HiddenFor(model => model.Id, new { id = string.Concat("Id", Model.Id) })
            <div class="display-label">
                Versículo</div>
            <div class="display-field">
                @Html.DisplayFor(model => model.Versiculo)
            </div>
            <div class="display-field">
                @Html.Raw(Model.Texto)
            </div>
            <div class="display-field" style="position: relative;">
                @if (Model.UsuarioEstaLogado && !Model.UsuarioLogadoLeuTexto)
                {
                    <a href="#" id="@string.Concat("EuLi", Model.Id)">Eu li!</a>
                }
                <br />
                <div style="position: absolute;">
                    <label style="font-weight: bold;" id="@string.Concat("TextoLeitura" + Model.Id)">@Model.TextoLeitura
                    </label>
                </div>
                <div id="@string.Concat("DivUsuarios" + Model.Id)" style="display:none;position: absolute; top: 0; left:100px;z-index: 10;" class="divTexto borderVermelha">
                    <span class="vermelho negrito">Pessoas que leram este texto: </span>
                    <br />
                    <br />
                    @{
                        var random = new Random();
                        foreach (var usuario in Model.Usuarios.OrderBy(x => random.Next()).Take(5))
                        {
                        <div style="clear: both; height: 33px; line-height: 33px; vertical-align: middle;">
                            <div class="floatLeft" style="width: 40px;">
                                @Html.Partial("~/Views/PartialView/FotoUsuario.cshtml", new Unijovem.UI.Models.FotoUsuarioModel { MaxHeight = 30, MaxWidth = 30, Pessoa = usuario })
                            </div>
                            <div class="floatLeft">
                                @Html.ActionLink(usuario.NomeCompleto, "Perfil", "Pessoa", new { id = usuario.Id }, null)
                            </div>
                        </div>         
                        }
                        if (Model.Usuarios.Count > 5)
                        {
                        <br />
                        <a href="#" id="@string.Concat("verTodasPessoas", Model.Id)">Ver todos</a>
                        }
                    }
                </div>
            </div>
        </fieldset>
    </div>
</div>
<div id="@string.Concat("dialog-modal", Model.Id)" title="Veja todos que leram o texto de @Model.Versiculo" style="display:none">
    @foreach (var usuario in Model.Usuarios)
    {
        <div style="clear: both; height: 70px; line-height: 70px; vertical-align: middle;">
            <div class="floatLeft" style="width: 90px;">
                @Html.Partial("~/Views/PartialView/FotoUsuario.cshtml", new Unijovem.UI.Models.FotoUsuarioModel { MaxHeight = 70, MaxWidth = 70, Pessoa = usuario })
            </div>
            <div class="floatLeft">
                @Html.ActionLink(usuario.NomeCompleto, "Perfil", "Pessoa", new { id = usuario.Id }, null)
            </div>
        </div>         
    }
</div>
@Html.Action("Comentar", "Comentario", new { idExterno = Model.Id, tipo = Unijovem.UI.Models.ComentarioModel.TipoComentario.LeituraBiblica })
@Html.Action("ListarComentarios", "Comentario", new { id = Model.Id })
